﻿namespace Batman.Maintenance.DTO.Column
{
    public class SwitchColumn : MaintenaceColumn
    {
        /// <summary>
        ///  左边文字
        /// </summary>
        public string LeftText { get; set; }

        /// <summary>
        /// 右边文字
        /// </summary>
        public string RightText { get; set; }

        /// <summary>
        /// 激活值
        /// </summary>
        public object ActiveValue { get; set; } = true;

        /// <summary>
        /// 不激活值
        /// </summary>
        public object InActiveValue { get; set; } = false;

        /// <summary>
        /// 开关变化后的动作地址
        /// </summary>
        public string ChangeAction { get; set; }

        /// <summary>
        /// 激活状态的颜色
        /// </summary>
        public string ActiveColor { get; set; } = "#13ce66";

        /// <summary>
        /// 非激活状态颜色
        /// </summary>
        public string InActiveColor { get; set; } = string.Empty;

        public SwitchColumn()
        {
            this.Type = Enums.MaintenanceColumnType.Switch;
        }

        public SwitchColumn(string label, string prop) : base(label, prop, Enums.MaintenanceColumnType.Switch)
        {
        }

        public SwitchColumn(string label, string prop, string leftText, string rightText) : this(label, prop)
        {
            this.LeftText = leftText;
            this.RightText = rightText;
        }
    }
}
